import { observer } from 'mobx-react';
import { runInAction } from 'mobx';
import store from '@/store/public';

function change(){
	runInAction(()=>{
		store.list.push({
			a:Math.random(),
			b:Math.random()
		});
	})
}
function Index(){
	return (
		<>
			<div className="main" style={{minHeight:'100px'}} onClick={change}>
				<ul>
					{store.list.map((item,index) => <li key={index}>{item.a} + {item.b}</li>)}
				</ul>
			</div>
		</>
	)
}

export default observer(Index);